-
Notifications
You must be signed in to change notification settings - Fork 523
Matter Camera: Only update profile if capabilities have changed #2686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matter Camera: Only update profile if capabilities have changed #2686
Conversation
|
|
||
| if camera_utils.optional_capabilities_list_changed(optional_supported_component_capabilities, device.profile.components) then | ||
| device:try_update_metadata({profile = "camera", optional_component_capabilities = optional_supported_component_capabilities}) | ||
| if #doorbell_endpoints > 0 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
button config can be put behind the optional_capabilities_list_changed gate so it doesn't run each time CameraAvStreamManagement.AttributeList is received.
Test Results 71 files 480 suites 0s ⏱️ Results for commit c914691. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against c914691 |
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
784195c to
7f067b7
Compare
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
b5204a5 to
c6c6f67
Compare
c6c6f67 to
6b5ec29
Compare
The `optional_capabilities_list_changed` function was not properly comparing the new set of supported capabilities with the current set, meaning that a profile update was occurring each time `camera_av_stream_management_attribute_list_handler` runs. This commit fixes `optional_capabilities_list_changed` and provides new test cases to ensure that the extraneous profile updates no longer occur.
6b5ec29 to
c914691
Compare
The
optional_capabilities_list_changedfunction was not properly comparing the new set of supported capabilities with the current set, meaning that a profile update was occurring each timecamera_av_stream_management_attribute_list_handlerruns. This commit fixesoptional_capabilities_list_changedand provides new test cases to ensure that the extraneous profile updates no longer occur.Tested with Matter SDK Camera example.